package upeu.edu.pe.servicio;

import java.util.List;

//import com.cticsperu.dao.SivMenuDao;
//import com.cticsperu.model.SivMenu;
import upeu.edu.pe.dao.SauMenuDao;
import upeu.edu.pe.modelo.SauMenu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service("menuService")
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class SauMenuServicioImpl implements SauMenuServicio {

	@Autowired
	private SauMenuDao menuDao;

	public SauMenuServicioImpl() {
	}

	@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
	public void addMenu(SauMenu menu) {         
		menuDao.saveMenu(menu);
	}

	public List<SauMenu> listMenu() {
		return menuDao.listMenu();
	}
	public List<SauMenu> listaNombreMenu() {
		return menuDao.listaNombreMenu();
	}

}